package crm.dao.impl;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.springframework.orm.hibernate4.support.HibernateDaoSupport;

import crm.dao.ProjectsDao;
import crm.dto.Project;

public class ProjectsDaoImpl extends HibernateDaoSupport implements  ProjectsDao{

	@SuppressWarnings("unchecked")
	public List<Project> getProjects() {
		
		DetachedCriteria dc = DetachedCriteria.forEntityName("Project");
		List<Project> list = (List<Project>) getHibernateTemplate().findByCriteria(dc);
				
		return list;

	}


	
	
}
